package web_model

import (
	"time"

	"gorm.io/gorm"
)

const TableNameDictHeader = "dict_header"

// DictHeader mapped from table <dict_header>
type DictHeader struct {
	ID        int64          `gorm:"column:id;type:INTEGER;primaryKey;AUTO_INCREMENT" json:"id"`
	Label     string         `gorm:"column:label;type:text;not null" json:"label"`
	Name      string         `gorm:"column:name;type:TEXT;not null" json:"name"`
	Status    string         `gorm:"column:status;type:TEXT;not null" json:"status"`
	Sort      int64          `gorm:"column:sort;type:integer;not null" json:"sort"`
	Desc      string         `gorm:"column:desc;type:TEXT;not null" json:"desc"`
	CreatedAt time.Time      `gorm:"column:created_at;type:DATETIME;not null" json:"created_at"`
	UpdatedAt time.Time      `gorm:"column:updated_at;type:DATETIME;not null" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:DATETIME;not null" json:"deleted_at"`
	CreatedBy string         `gorm:"column:created_by;type:TEXT;not null" json:"created_by"`
	UpdatedBy string         `gorm:"column:updated_by;type:text;not null" json:"updated_by"`
}

// TableName DictHeader's table name
func (*DictHeader) TableName() string {
	return TableNameDictHeader
}
